const Koa = require('koa');
const koaStatic = require('koa-static-cache');
const pathLib = require('path');

let server = new Koa();

server.use(require('./router'));

server.use(koaStatic(pathLib.resolve(__dirname, './static'), {
    prefix: '/public',
    gzip: true
}));

server.listen(8080, () => {
    console.log('server running at 8080 port');
});